﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TomNet.IMSC.Model.Infrastructure;

namespace TomNet.IMSC.Model.DbModels.NewHouse
{
    /// <summary>
    /// 新房楼盘表
    /// </summary>
    public class Buildings : GeneralBase<int>
    {
        public int OldID { get; set; }
        #region 主表信息

        /// <summary>
        /// 楼盘名称
        /// </summary>
        //[StringLength(50)]
        public string Name { get; set; }
        /// <summary>
        /// 楼盘地址
        /// </summary>
        [StringLength(255)]
        public string Address { get; set; }
        /// <summary>
        /// 地区ID
        /// </summary>
        //[StringLength(50)]
        public string AreaID { get; set; }
        /// <summary>
        /// 售价
        /// </summary>
        //[StringLength(50)]
        public string SellingPrice { get; set; }
        /// <summary>
        /// 租价
        /// </summary>
        //[StringLength(50)]
        public string LeasePrice { get; set; }

        /// <summary>
        /// 楼盘说明
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 类型 类型  1住宅  2旅游地产  3门市   4商铺
        /// </summary>
        public string BuildingTypeID { get; set; }
        /// <summary>
        /// 状态 1 上线，2 下线, 3 即将上线
        /// </summary>
        public int State { get; set; }
        /// <summary>
        /// 代理ID
        /// </summary>
        public int AgentID { get; set; }
        /// <summary>
        /// 渠道人员（本公司业务人员）
        /// </summary>
        public int MediumOfCommunicationStaffID { get; set; }
        /// <summary>
        /// 驻场人员
        /// </summary>
        public int StationedStaffID { get; set; }

        /// <summary>
        /// 星标--结算模式
        /// </summary>
        public string StarTarget { get; set; }
        /// <summary>
        /// 星标备注
        /// </summary>
        public string StarTargetRemark { get; set; }
        /// <summary>
        /// 租售类型---1租---2售---3租售
        /// </summary>
        public int LetSellType { get; set; }

        /// <summary>
        /// 楼盘信息
        /// </summary>
        public string BuildingInfo { get; set; }

        /// <summary>
        /// 省
        /// </summary>
        public string Province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public string City { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        public string District { get; set; }

        #endregion

        #region 佣金设置

        /// <summary>
        /// 销售佣金
        /// </summary>
        [StringLength(255)]
        public string SellingBrokerage { get; set; }
        /// <summary>
        /// 出租佣金
        /// </summary>
        [StringLength(255)]
        public string LeaseBrokerage { get; set; }
        /// <summary>
        /// 带看佣金
        /// </summary>
        [StringLength(255)]
        public string BandSawBrokerage { get; set; }
        /// <summary>
        /// 佣金帐期
        /// </summary>
        public string CommissionAccount { get; set; }

        #endregion

        #region 楼盘详情

        /// <summary>
        /// 开盘时间
        /// </summary>
        public DateTime OpeningTime { get; set; }
        /// <summary>
        /// 交房时间
        /// </summary>
        public DateTime LaunchTime { get; set; }
        /// <summary>
        /// 开发商
        /// </summary>
        //[StringLength(50)]
        public string Developer { get; set; }
        /// <summary>
        /// 开发商品牌
        /// </summary>
        //[StringLength(50)]
        public string DeveloperBrand { get; set; }
        /// <summary>
        /// 物业公司
        /// </summary>
        //[StringLength(50)]
        public string PropertyManagementCompany { get; set; }
        /// <summary>
        /// 建筑面积
        /// </summary>
        //[StringLength(50)]
        public string CoveredArea { get; set; }
        /// <summary>
        /// 总户数
        /// </summary>
        //[StringLength(50)]
        public string TotalHouseholds { get; set; }
        /// <summary>
        /// 容积率
        /// </summary>
        //[StringLength(50)]
        public string PlotRatio { get; set; }
        /// <summary>
        /// 绿化率
        /// </summary>
        //[StringLength(50)]
        public string GreeningRatio { get; set; }
        /// <summary>
        /// 车位数
        /// </summary>
        //[StringLength(50)]
        public string CarNumber { get; set; }
        /// <summary>
        /// 车位比
        /// </summary>
        //[StringLength(50)]
        public string ParkingRatio { get; set; }
        /// <summary>
        /// 均价
        /// </summary>
        //[StringLength(50)]
        public string AveragePrice { get; set; }
        /// <summary>
        /// 物业费
        /// </summary>
        //[StringLength(50)]
        public string PropertyManagementFee { get; set; }
        /// <summary>
        /// 建筑类型
        /// </summary>
        //[StringLength(50)]
        public string BuildingClass { get; set; }
        /// <summary>
        /// 装修状况
        /// </summary>
        //[StringLength(50)]
        public string DecorationCondition { get; set; }
        /// <summary>
        /// 产权年限
        /// </summary>
        //[StringLength(50)]
        public string PropertyRight { get; set; }


        #endregion

        #region 开发商规则


        /// <summary>
        /// 合作开始时间
        /// </summary>
        public DateTime CooperateBeginTime { get; set; }
        /// <summary>
        /// 合作结束时间
        /// </summary>
        public DateTime CooperateEndTime { get; set; }
        /// <summary>
        /// 认购截止时间
        /// </summary>
        public DateTime SubscriptionDeadline { get; set; }
        /// <summary>
        /// 合作房源
        /// </summary>
        public string CooperativeHousing { get; set; }
        /// <summary>
        /// 开发商规则
        /// </summary>
        public string DevelopersRules { get; set; }
        /// <summary>
        /// 奖励说明
        /// </summary>
        public string AwardDescription { get; set; }
        /// <summary>
        /// 报备规则
        /// </summary>
        public string FilingRules { get; set; }
        /// <summary>
        /// 带看规则
        /// </summary>
        public string BandSawRules { get; set; }
        /// <summary>
        /// 成交规则
        /// </summary>
        public string TransactionRules { get; set; }


        #endregion

        #region 卖点信息


        /// <summary>
        /// 价格优势
        /// </summary>
        public string PriceAdvantage { get; set; }
        /// <summary>
        /// 户型面积
        /// </summary>
        public string HouseTypeArea { get; set; }
        /// <summary>
        /// 生活配套
        /// </summary>
        public string LivingFacilities { get; set; }
        /// <summary>
        /// 学区配套
        /// </summary>
        public string SchoolDistrict { get; set; }
        /// <summary>
        /// 交通出行
        /// </summary>
        public string Transportation { get; set; }
        /// <summary>
        /// 区域发展
        /// </summary>
        public string RegionalDevelopment { get; set; }
        /// <summary>
        /// 项目特色
        /// </summary>
        public string Characteristic { get; set; }
        /// <summary>
        /// 品牌优势
        /// </summary>
        public string BrandAdvantage { get; set; }
        /// <summary>
        /// 竞品对比
        /// </summary>
        public string HaveProductComparison { get; set; }


        #endregion

        #region 坐标，位置，排序

        /// <summary>
        /// 经度
        /// </summary>
        public double X { get; set; }
        /// <summary>
        /// 纬度
        /// </summary>
        public double Y { get; set; }
        /// <summary>
        /// 显示顺序
        /// </summary>
        public int ShowIndex { get; set; }
        #endregion



        public Buildings()
        {
            OpeningTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy") + "-01-" + "01");
            LaunchTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy") + "-01-" + "01");
            CooperateBeginTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy") + "-01-" + "01");
            CooperateEndTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy") + "-01-" + "01");
            SubscriptionDeadline = Convert.ToDateTime(DateTime.Now.ToString("yyyy") + "-01-" + "01");
            StarTarget = Convert.ToInt32(StarTargetTypeEnum.取消).ToString();
            OldID = 0;
        }

    }

    public enum StarTargetTypeEnum
    {
        取消 = 0,
        前佣 = 1,
        后佣 = 2,
        前佣_后佣 = 3,
        其他 = 4
    }

    public enum LetSellTypeeEnum
    {
        出租 = 1,
        销售 = 2,
        租售 = 3
    }

}
